package com.example.cloud.model.business.medical;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by wangtao on 2018/7/2.
 */
@Entity(name = "treat_plan_home_discount_product")
@Data
@EqualsAndHashCode(callSuper = false)
public class TreatPlanHomeDiscountProduct extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 家庭病房主键
    @Column(name = "home_id")
    private Long homeId;
    // 类别{1：大类 2：小类}
    @Column(name = "category_type")
    private int categoryType;
    // 品类
    @Column(name = "category_id")
    private Long categoryId;
    // 品类名称
    @Column(name = "category_name")
    private String categoryName;
    // 上级分类
    @Column(name = "parent_id")
    private Long parentId;
    // 折扣率
    @Column(name = "discount",columnDefinition = "DOUBLE(10,2) DEFAULT '0.00'")
    private Double discount;
}
